package com.lujieni.consumer.controller;

import com.lujieni.consumer.context.ErpUserContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class TokenController {

    @GetMapping(value = "/token")
    public String token(HttpServletRequest request){
        String userCode = ErpUserContext.getUserCode();
        String name = request.getHeader("name");
        String haha = request.getHeader("haha");
        return userCode + ":" + name + ":" + haha;
    }



}
